#!/bin/bash
ps aux|grep holo-server| awk '{print $2}'|xargs kill -9

sleep 1

echo "launch server"
nohup gunicorn --access-logfile - --enable-stdio-inheritance -w 2 -b 0.0.0.0:9001 wsgi &

sleep 1

echo "launch worker"
nohup celery -A celery_app worker -l info --concurrency 1 >> celery.out &
sleep 1

echo "launch beat"
nohup celery -A celery_app beat -l info >> beat.out &


#tail -f nohup.out